<meta charset="utf-8">
<div class="content-table">
    <div class="carousel slide" id="myCarousel" data-ride="carousel" data-interval="false">
        <div class="photo-upload-panel">
            <!-- 上传插件导航栏 -->
            <div class="upload-nav">
                <nav class="navbar navbar-upload">
                    <div class="navbar-header">
                        <a class="navbar-brand navbar-patient-name">
                            {{patient.patientname}}
                        </a>
                    </div>
                    <ul class="nav navbar-nav">
                        <li class="active" data-slide-to="0" data-target="#myCarousel">
                            <a href="javascript:;">面部照片</a>
                        </li>
                        <li data-slide-to="1" data-target="#myCarousel">
                            <a href="javascript:;">口腔照片</a>
                        </li>
                        <li data-slide-to="2" data-target="#myCarousel">
                            <a href="javascript:;">X光片</a>
                        </li>
                    </ul>
                    <ul class="nav navbar-nav navbar-right">
                        <li>
                            <div class="input-group upload-info">
                                <span class="input-group-addon">治疗日期</span>
                                <input type="date" ng-model="vm.treatDate" class="form-control">
                            </div>
                        </li>
                        <li>
                            <div class="input-group upload-info">
                                <div class="input-group-btn">
                                    <button type="button" class="btn btn-default
                     dropdown-toggle" data-toggle="dropdown">
                                        治疗状态
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu">
                                        <li>
                                            <a ng-click="changestate(0)">治疗前期</a>
                                        </li>
                                        <li>
                                            <a ng-click="changestate(1)">治疗中期</a>
                                        </li>
                                        <li>
                                            <a ng-click="changestate(2)">治疗后期</a>
                                        </li>
                                    </ul>
                                </div>
                                <!-- /btn-group -->
                                <input type="text" ng-model="vm.currentstate" class="form-control" disabled>
                            </div>
                        </li>
                    </ul>
                </nav>
            </div>

            <div class="upload-show">
                <!-- 轮播（Carousel）项目 -->
                <div class="upload-inner">
                    <div class="carousel-inner">
                        <div class="item active upload-picker">
                            <ul class="upload-picker-heads">
                                <li class="upload-item" ng-repeat="item in headphs">
                                    <div class="upload-head-img">
                                        <div ngf-select ng-model="item.imageFile" ngf-fix-orientation="false">
                                            <img class="upload-head-imgs" ngf-thumbnail="item.imageFile || '{{item.imageSrc}}'">
                                        </div>
                                        <div class="progress">
                                            <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: {{item.progress}}%;">
                                                <span>{{item.progress}}%</span>
                                            </div>
                                        </div>
                                    </div>
                                </li>
                                <li class="upload-item">
                                    <div class="upload-head-img">
                                        <div ngf-select ng-model="newFile" ngf-change="addhead(newFile)">
                                            <img class="upload-head-imgs" src="img/addhead.png">
                                        </div>
                                        <div class="progress">
                                            <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"></div>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                        <div class="item upload-picker">
                            <ul class="upload-picker-teeth">
                                <li class="upload-item" ng-repeat="item in toothphs">
                                    <div class="upload-teeth-img">
                                        <div ngf-select ng-model="item.imageFile">
                                            <img class="upload-teeth-imgs" ngf-thumbnail="item.imageFile || '{{item.imageSrc}}'">
                                        </div>
                                        <div class="progress">
                                            <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: {{item.progress}}%;">
                                                <span>{{item.progress}}%</span>
                                            </div>
                                        </div>
                                    </div>
                                </li>
                                <li class="upload-item">
                                    <div class="upload-teeth-img">
                                        <div ngf-select ng-model="newFile" ngf-change="addteeth(newFile)">
                                            <img class="upload-teeth-imgs" src="img/addteeth.png">
                                        </div>
                                        <div class="progress">
                                            <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"></div>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>

                        <div class="item upload-picker">
                            <ul class="upload-picker-ximg">
                                <li class="upload-item" ng-repeat="item in ximgs">
                                    <div class="upload-x-img">
                                        <div ngf-select ng-model="item.imageFile">
                                            <img class="upload-x-imgs" ngf-thumbnail="item.imageFile || '{{item.imageSrc}}'">
                                        </div>
                                        <div class="progress">
                                            <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: {{item.progress}}%;">
                                                <span>{{item.progress}}%</span>
                                            </div>
                                        </div>
                                    </div>
                                </li>
                                <li class="upload-item">
                                    <div class="upload-x-img">
                                        <div ngf-select ng-model="newFile" ngf-change="addximg(newFile)">
                                            <img class="upload-x-imgs" src="img/addx.png">
                                        </div>
                                        <div class="progress">
                                            <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"></div>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                            <div class="upload-confirm">
                                <button class="btn btn-primary btn-block" ng-if="vm.uploadPocess!='done'" ng-disabled="vm.state==null || vm.treatDate==null || vm.uploadPocess=='pocessing'" ng-click="uploadAlert()" type="button">
                                    点击上传所有图片
                                </button>
                                <button class="btn btn-success btn-block" ng-if="vm.uploadPocess=='done'" ng-click="cancel()">上传成功，请点击返回</button>
                            </div>
                        </div>

                    </div>
                </div>
            </div>

            <a class="left carousel-control" data-target="#myCarousel" role="button" data-slide="prev">
                <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                <span class="sr-only">Previous</span>
            </a>
            <a class="right carousel-control" data-target="#myCarousel" data-slide="next">
                <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                <span class="sr-only">Next</span>
            </a>

        </div>
    </div>
</div>

<script type="text/ng-template" id="uploadAlert.html">
    <div class="modal-header">
        <h4 class="modal-title">确定上传这些图像吗？</h4>
    </div>
    <div class="modal-footer">
        <button class="btn btn-primary" ng-click="uploadConfirm()">上传</button>
        <button class="btn btn-default" ng-click="cancel()">取消</button>
    </div>
</script>
